<?php

namespace common\entities\myhtsq;

use Yii;

/**
 * This is the model class for table "{{%myscrm_role_action}}".
 *
 * @property integer $id
 * @property integer $role_id
 * @property integer $action_id
 */
class MyscrmRoleActionEntity extends \common\entities\ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%myscrm_role_action}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('cdb');
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['id', 'role_id', 'action_id'], 'integer']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'role_id' => 'Role ID',
            'action_id' => 'Action ID',
        ];
    }
}
